    <!DOCTYPE html>
    <html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <button v-on:click='sayHi'> click Me</button>
</div>


<script src="vue.js"></script>
<script>
    var vm=new Vue({
        el: "#app",
        data: {
          message:"cljh学java"
        },
        methods:{
            //方法必须定义在Vue 的method中
            sayHi: function () {
                alert(this.message);

            }
        }
    });
</script>
</body>
</html>